# Maintainer: Will Sinatra <wpsinatra@gmail.com>
maintainer="Will Sinatra <wpsinatra@gmail.com>"
pkgname=font-iosevka
pkgver=32.0.1
pkgrel=0
pkgdesc="Versatile typeface for code, from code"
url="https://typeof.net/Iosevka/"
arch="noarch"
options="!check" # no testsuite
license="OFL-1.1"
depends="fontconfig"
subpackages="
	$pkgname-base
	$pkgname-aile
	$pkgname-etoile
	$pkgname-slab
	$pkgname-curly
	$pkgname-curly-slab:curly_slab
	"
source="
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-Iosevka-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaAile-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaEtoile-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-IosevkaSlab-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-SGr-IosevkaCurly-$pkgver.zip
	https://github.com/be5invis/Iosevka/releases/download/v$pkgver/PkgTTC-SGr-IosevkaCurlySlab-$pkgver.zip
	"

builddir="$srcdir"

package() {
	depends="
		$pkgname-base=$pkgver-r$pkgrel
		$pkgname-aile=$pkgver-r$pkgrel
		$pkgname-etoile=$pkgver-r$pkgrel
		$pkgname-slab=$pkgver-r$pkgrel
		$pkgname-curly=$pkgver-r$pkgrel
		$pkgname-curly-slab=$pkgver-r$pkgrel
		"

	install -Dm644 "$builddir"/*.ttc \
		-t "$pkgdir"/usr/share/fonts/${pkgname#font-}
}

base() {
	pkgdesc="$pkgdesc (Iosevka)"
	amove usr/share/fonts/iosevka/Iosevka-*.ttc
}

aile() {
	pkgdesc="$pkgdesc (Iosevka Aile)"
	amove usr/share/fonts/iosevka/IosevkaAile-*.ttc
}

etoile() {
	pkgdesc="$pkgdesc (Iosevka Etoile)"
	amove usr/share/fonts/iosevka/IosevkaEtoile-*.ttc
}

slab() {
	pkgdesc="$pkgdesc (Iosevka Slab)"
	amove usr/share/fonts/iosevka/IosevkaSlab-*.ttc
}

curly() {
	pkgdesc="$pkgdesc (Iosevka Curly)"
	amove usr/share/fonts/iosevka/SGr-IosevkaCurly-*.ttc
}

curly_slab() {
	pkgdesc="$pkgdesc (Iosevka Curly Slab)"
	amove usr/share/fonts/iosevka/SGr-IosevkaCurlySlab-*.ttc
}

sha512sums="
8b78ff49717d6071074d0e7b12395aab1e206ac6951e65456225b05ba08813d3a8447ee603b5501595894a99a6fcda1b01cff46b05234df39481f33ce5b49ddd  PkgTTC-Iosevka-32.0.1.zip
429c75a4e8058b0ad351ff892aaf5bf9174e9fd632b64af354d05e615206609afa56d4e2aedc837c7db27610c13115d6a9021cdfe5efee113df9c142e514cacd  PkgTTC-IosevkaAile-32.0.1.zip
4ce41cbcd14e4680e40c19c2693936a4ceb4e2927fc1d535ceb33930d9b3bb4bde25212ea211f99ae1c61a33f035974f78761b102d2a27fd043c646bdb94a374  PkgTTC-IosevkaEtoile-32.0.1.zip
af948dcd2cb7a8723340f4e30617d626145a785bf62020cda6cd879fb6f98f0c0a107b2ed652bfff46179b0e457a2821927e1f911196d43e855736f080a2136f  PkgTTC-IosevkaSlab-32.0.1.zip
23ed3ab5d7500beb0696658de8b3c72b390e5686724b432d383c1794eabc0fd8d728814bb08eba8fde6f791ed3eb258e1c2bc0403925f7982c0d7f691b04b85a  PkgTTC-SGr-IosevkaCurly-32.0.1.zip
d73f4cade9c702935b273b685dfa28b2d1c5b5e88a4c1047e81dcf3094973f5086b3642770ccdbc25a6a77aa0b04265f2e30616653a6af4bd3d913f34576297e  PkgTTC-SGr-IosevkaCurlySlab-32.0.1.zip
"
